package cn.hzc.fortess.system.dao;

import cn.hzc.fortess.system.entity.Dept;
import cn.hzc.fortess.system.node.TreeviewNode;
import cn.hzc.fortess.system.node.ZTreeNode;
import cn.hzc.fortess.system.search.DeptSearch;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeptDao {

    int delete(Integer id);

    int insert(Dept record);

    Dept findById(Integer id);

    int update(Dept record);

    Integer findRootDeptByLessee(Integer lesseeId);

    List<Dept> page(DeptSearch search);

    long count(DeptSearch search);

    List<Dept> likePids(@Param("id") Integer id);

    List<ZTreeNode> tree(@Param("lesseeId") Integer lesseeId);

    List<TreeviewNode> treeviewNodes();

//    int updateUserDept(@Param("deptId") Integer deptId,@Param("deptName")String deptName);
}